﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <script src="Scripts/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
    <link href="Styles/jquery-ui-1.9.1.custom.min.css" rel="stylesheet" type="text/css" />

    <script>
        $(function () {
            $("#tabs").tabs();
            $("#button").click(function () {
                var id = jQuery('.ui-tabs-selected a', window.parent.document).attr('href')
                alert(id);
            });
        });

        
    </script>
</head>
<body>
    <div id="tabs">
                    <ul>
                        <li class="tab" id="5"><a href="#tab-9">tab 9</a></li>
                        <li class="tab" id="6"><a href="#tab-10">tab 10</a></li>
                        <li class="tab" id="7"><a href="#tab-21">tab 21</a></li>
                    </ul>
                    <div id="tab-9">
                        tab 9
                    </div>
                   <div id="tab-10">
                        tab 10
                    </div>
                   <div id="tab-21">
                        tab 21
                    </div>
                </div>

<br /><br />

<input type="button" id="button" value="get selected" />
</body>
</html>
